package com.chenju.invokechainservice.test;

import java.io.FileNotFoundException;

public class Example {
    public static void main(String[] args) {
        try {
            someMethod();
        } catch (FileNotFoundException e) {
            // 捕获FileNotFoundException并抛出自定义异常FunnyFileNotFoundException
            throw new FunnyFileNotFoundException("Custom message: File not found!", e);
        }
    }

    public static void someMethod() throws FileNotFoundException {
        // 假设在这个方法中抛出了FileNotFoundException
        throw new FileNotFoundException("File not found!");
    }
}

class FunnyFileNotFoundException extends RuntimeException {
    public FunnyFileNotFoundException(String msg, Throwable cause) {
        super(msg, cause);
    }
}

